$(function(){
	var Alert1 = new Alert(); 
	var confirm1 = new Confirm();
	var departMana = {
		init:function(){
			datePicker.datePickerMonth($(".form_date").eq(0));
			datePicker.datePickerTimes($(".form_date").eq(1));
			this.bindEvent();
		},
		bindEvent:function(){
			var self = this;
			self.allCheckEvent();
			$(".delDepart").off("click").on("click",function(){
				self.delListEvent();
			});
			
			var sumpage = 2;
			var nowpage = 1;
			var pagenumber = 10;
			$(".tcdPageCode").createPage({ 
			        pageCount:sumpage,//总页数
			        current:nowpage,//当前页数
					pageNumber:pagenumber,//每页显示数量
			        backFn:function(p){        	
			    		nowpage = p;
			    		if(nowpage>=sumpage){
			    			nowpage = sumpage;
			    		}
				    }
				});
		},
		delListEvent:function(){
			
			if($(".oneCheck[value=1]").length == 0) {
				Alert1.content = "请选择要删除的院系";
				Alert1.init();
				Alert1.show();
			}else{
				confirm1.content = "确定删除吗"
				confirm1.success = function(){
					
				};
				confirm1.fail = function(){
				
				};
				confirm1.init();
				confirm1.show();
				
			}
		},
		allCheckEvent:function(){
			//全选
			allCheck.init("controlAll","oneCheck");
		}
	};
	departMana.init();
});
